package com.seuic.hnjiningposapp.hnapps.ui.view.dialog;

import android.content.Context;
import android.widget.TextView;

import androidx.annotation.NonNull;

import com.lxj.xpopup.core.CenterPopupView;
import com.seuic.hnjiningposapp.R;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.Unbinder;

/**
 * 执行操作 eg:验证密码 获取客户信息 验证黑名单 查询交易次数交易金额  获取备付金信息
 */
public class AutomaticOperationPopup extends CenterPopupView {
    @BindView(R.id.name_tv)
    TextView nameTv;
    private Unbinder bind;
    String mName;

    public AutomaticOperationPopup(@NonNull Context context, String name) {
        super(context);
        this.mName = name;
    }

    @Override
    protected int getImplLayoutId() {
        return R.layout.automatic_operation_layout;
    }

    @Override
    protected void onCreate() {
        super.onCreate();
        bind = ButterKnife.bind(this);
        nameTv.setText(mName);
    }

    @Override
    protected void onDismiss() {
        super.onDismiss();
        //注解解绑
        if (bind != null && bind != Unbinder.EMPTY) {
            bind.unbind();
        }
        this.bind = null;
    }
}
